package com.kaibes.module.verification;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.kaibes.web.api.ApiLink;

@RestController
@RequestMapping("/verifications")
public class VerificationApi extends VerificationAction {

    @ApiLink(value = "纯数字验证码", validated = false)
    @GetMapping("/num")
    public void drawNums(HttpSession session, HttpServletResponse response, @RequestParam String tag) {
        super.drawNums(session, response, tag, 5);
    }

    @ApiLink(value = "纯字母验证码", validated = false)
    @GetMapping("/letter")
    public void drawLetters(HttpSession session, HttpServletResponse response, @RequestParam String tag) {
        super.drawLetters(session, response, tag, 5);
    }

    @ApiLink(value = "字符串验证码", validated = false)
    @GetMapping("/char")
    public void drawChars(HttpSession session, HttpServletResponse response, @RequestParam String tag) {
        super.drawChars(session, response, tag, 5);
    }

}
